<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>库存期初建账管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		
		
		function down(){
			top.$.jBox.confirm("确认要导出出入库数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/vaccinate/bsProduct/export");
					$("#searchForm").submit();
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		}
		
		function deleteRecord(id){
// 			alert(id);
			var url = "${ctx}/vaccinate/bsProduct/deleteRecord";
			$.ajax({
				url : url,
				data : {"id": id},
				success :function(data){
					
				}
			});
		}
		
	</script>

	<style type="text/css">
		.minWidth {
			min-width: 177px;
		}	
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/vaccinate/bsProduct/">建账记录</a></li>
	
	</ul>
	<form:form id="searchForm" modelAttribute="bsProduct" action="${ctx}/vaccinate/bsProduct/queryRecordList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="breadcrumb">
			<table class="table table-bordered">
				<tr>
					
				<tr>
					<th>创建人：</th>
					<td>
						<input name="updateByUser" type="text" value="${record.creator}" readonly="true" maxlength="20" />
								
					</td>
					<th>创建日期：</th>
					<td colspan="3">
						<input name="updateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${record.createDate}" pattern="yyyy-MM-dd"/>"
						/>
					</td>
				</tr>
			</table>
		</div>
	
		<ul class="ul-form breadcrumb">
			<li class="btns">
			<a href="${ctx}/vaccinate/bsProduct/queryRecordList" class="btn btn-primary">返回列表</a>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				
				<th>编号</th>
				<th>疫苗名称</th>
				<th>疫苗属性</th>
				<th>疫苗生产企业</th>
				<th>批号</th>
				<th>规格(剂/支或粒)</th>
				<th>剂量</th>
				<th>建账数量(支或粒)</th>
				<th>修改人</th>
				<th>修改日期</th>
				
			</tr>
		</thead>
		<tbody>
		<c:set var="index" value="0"/>
		<c:forEach items="${page.list}" var="records">
			<tr>
				
				<td>
					<c:set var="index" value="${index+1}" />
					${index }  
				</td>
				<td>
					${records.bsVaccineBatchno.vaccineName}
				</td>
				<td>
					${records.bsVaccineBatchno.type1}
				</td>
				<td>
					${records.bsVaccineBatchno.companyName}
				</td>
				<td>
					${records.bsVaccineBatchno.batchNo}
					<c:if test="${not empty records.bsVaccineBatchno.secondBatchno}">
				        <span title="(查询批号时不需要带入亚批号)" style="color: #2fa4e7;">-${records.bsVaccineBatchno.secondBatchno}</span>
				    </c:if>
				</td>
				<td>
					${records.bsVaccineBatchno.spec}
				</td>
				<td>
					${records.bsVaccineBatchno.dose}
				</td>
				<td>
					${records.num}
				</td>
				<td>
				
					${records.updater}
				</td>
				<td>
					<fmt:formatDate value="${records.product.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"	/>
				</td>
				<%-- <td>
				<shiro:hasPermission name="vaccinate:bsProduct:view">
    				<a href="${ctx}/vaccinate/bsProduct/form?id=${records.id}">查看</a>
					<a href="${ctx}/vaccinate/bsProduct/edit?id=${records.id}">修改</a>
					<a href="javascript:;" onclick="deleteRecord("${records.id}")">删除</a>
				</shiro:hasPermission>
				</td> --%>
			</tr>
		</c:forEach>
		
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>